home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
CED
/
cedscripts
/
SetBookmark.ced
< prev
next >
Wrap
Text File
|
1993-07-07
|
1KB
|
56 lines
/*
** SetBookmark.ced
**
** $VER: SetBookmark.ced 1.1.0 (27.05.93)
**
** This script stores the current cursor position into a numbered
** bookmark in an ARexx clip.
**
** This script requires CygnusEd Professional v3.5 (or later) to run.
**
** Copyright © 1993 ASDG, Incorporated All Rights Reserved
*/
OPTIONS RESULTS
NL = '0A'X
TRUE = 1
FALSE = 0
/*
** Get the bookmark description.
*/
CEDTOFRONT
GETSTRING "1" '"Set which bookmark?"'
IF (RESULT = "") THEN
EXIT 0
ELSE NewBookmark = RESULT
/*
** If it's one of the menu-selectable bookmarks, then set the
** appropriate mark. If the user selected mark 4, then it will be used
** as the auto-mark.
*/
IF (NewBookmark >= 1) & (NewBookmark <= 4) THEN
MARK LOCATION NewBookmark
/*
** Store the cursor's location in a clip.
*/
STATUS CURSORCOLUMN
CurrCursorCol = RESULT + 1
STATUS CURSORLINE
CurrCursorLine = RESULT + 1
BookmarkID = "CEDBookmark" || NewBookmark
BookmarkValue = CurrCursorLine || "," || CurrCursorCol
SETCLIP( BookmarkID, BookmarkValue )
EXIT 0